<%--
  Created by IntelliJ IDEA.
  User: c
  Date: 2017-11-17
  Time: 15:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <%@include file="/WEB-INF/jsp/header.jsp"%>

</head>
<style>
    table td{
        font: 14px 'microsoft yahei', 微软雅黑, Helvetica, Arial, Tahoma, 黑体, 宋体, sans-serif;
    }
</style>
<body>
    <div class="container-fluid">
        <div class="panel panel-default">
            <div class="panel-heading">
                <span class="h3">搜索</span>
                <a href=".panel-body" class="caret pull-right" data-toggle="collapse"></a>
            </div>
            <div class="panel-body collapse in fade">
                <form id="con" class="pull-left form-inline">
                    <label>采购编号：</label>
                    <input class="form-control" type="text" name="planNum" oninput="search()" placeholder="请输入采购编号" value="${param.planNum}">
                    &nbsp;&nbsp;&nbsp;
                    <label>审核状态：</label>
                    <div class="form-group">
                        <select class="form-control" name="planChstate" oninput="search()" id="xia">
                            <option value="-1">--请选择--</option>
                            <option value="0" >待审核</option>
                            <option value="1" >已通过</option>
                            <option value="2" >未通过</option>
                        </select>
                    </div>
                    &nbsp;&nbsp;<br/><br/>
                    <label>采购日期：</label>
                    <input type="text" class="form-control" name="startDate"/>-
                    <input type="text" class="form-control" name="endDate"/>
                    &nbsp;
                    <button type="button" onclick="search()" class="layui-btn layui-btn-small">
                        <i class="layui-icon"></i> 搜索
                    </button>
                </form>
            </div>
        </div>
        <table id="purTable"
               data-pagination-pre-text="上一页"
               data-pagination-next-text="下一页"
               data-click-to-select="true"
               data-toggle="table"
               data-url="${ctx}/pur/search"
               data-striped="true"
               data-toolbar="#toolbar"
               data-toolbar-align="right"
               data-pagination="true"
               data-side-pagination="server"
               data-page-size="10"
        >
            <thead>
                <tr>
                    <th data-checkbox="true"></th>
                    <th data-field="planNum">采购编号</th>
                    <th data-field="provider.proName">供应商</th>
                    <th data-field="provider.proPerson">联系人</th>
                    <th data-field="provider.proPhone">联系电话(供应商)</th>
                    <th data-field="planDate">采购日期</th>
                    <th data-field="worker.woName">采购员</th>
                    <th data-field="worker.woPhone">联系电话(采购员)</th>
                    <th data-field="planChstate" data-formatter="chstate">审核</th>
                    <th data-formatter="caozuo" data-events="optEvents">操作</th>
                </tr>
            </thead>
        </table>
    </div>
    <%@include file="/WEB-INF/jsp/footer.jsp"%>
    <script src="${ctx}/res/js/Purplan.js"></script>
</body>
</html>
